/*
 * Copyright (C) 拾光分享网 
 * All rights reserved, Designed By www.hiai.top.
 * Email：goodsking@163.com.
 * Version：V1.0.2(20230701).
 */
package top.hiai._admin.common;

import com.jfinal.config.Routes;

import top.hiai._admin.article.ArticleAdminController;
import top.hiai._admin.auth.AdminAuthInterceptor;
import top.hiai._admin.comments.CommentsAdminController;
import top.hiai._admin.index.IndexAdminController;
import top.hiai._admin.permission.PermissionAdminController;
import top.hiai._admin.reply.ReplyAdminController;
import top.hiai._admin.role.RoleAdminController;
import top.hiai._admin.user.UserAdminController;
import top.hiai._admin.words.WordsAdminController;

/**
* @Author www.hiai.top
* @Email  goodsking@163.com
* @Message 更多资源尽在www.hiai.top
* @Introduction 类的介绍：后台路由控制器
*/

public class AdminRoutes extends Routes {

	@Override
	public void config() {
		// 添加后台管理拦截器，将拦截在此方法中注册的所有 Controller
		addInterceptor(new AdminAuthInterceptor());
		//addInterceptor(new PjaxInterceptor());

		setBaseViewPath("/_view/_admin");
		
		add("/admin", IndexAdminController.class, "/index");
		
		add("/admin/user", UserAdminController.class, "/user");
		add("/admin/article", ArticleAdminController.class, "/article");
		add("/admin/comments", CommentsAdminController.class, "/comments");
		add("/admin/reply", ReplyAdminController.class, "/reply");
		add("/admin/words", WordsAdminController.class, "/words");

		add("/admin/role", RoleAdminController.class, "/role");
		add("/admin/permission", PermissionAdminController.class, "/permission");

	}
}